package com.sjgtw.cloud.remote.controller;

import com.sjgtw.cloud.common.core.web.controller.BaseController;
import com.sjgtw.cloud.common.core.web.domain.AjaxResult;
import com.sjgtw.cloud.common.core.web.page.TableDataInfo;
import com.sjgtw.cloud.util.EasyExcelUtil;
import com.sjgtw.cloud.web.jointDefenceUnit.domain.JointDefenceUnit;
import com.sjgtw.cloud.web.jointDefenceUnit.service.IJointDefenceUnitService;
import com.sjgtw.cloud.web.keysArea.domain.KeysAreas;
import com.sjgtw.cloud.web.keysArea.service.IKeysAreasService;
import com.sjgtw.cloud.web.rainfallMonitoring.domain.RainfallMonitoring;
import com.sjgtw.cloud.web.rainfallMonitoring.service.IRainfallMonitoringService;
import com.sjgtw.cloud.web.reservoir.domain.Reservoir;
import com.sjgtw.cloud.web.reservoir.service.IReservoirService;
import com.sjgtw.cloud.web.warningSign.service.IWarningSignsService;
import com.sjgtw.cloud.web.waterDamage.domain.WaterDamage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 水库分布Controller
 * 
 * @author ruoyi
 * @date 2024-03-11
 */
@RestController
@Api(tags = "远程数据调用接口管理")
@RequestMapping("/remote")
public class RemoteController extends BaseController
{
    @Autowired
    private IReservoirService reservoirService;

    @Autowired
    private IKeysAreasService keysAreasService;

    @Autowired
    private IJointDefenceUnitService jointDefenceUnitService;

    @Autowired
    private IRainfallMonitoringService rainfallMonitoringService;

    /**
     * 查询有效的雨量报警记录信息
     */

    @GetMapping("/getRainfallMonitoringList")
    @ApiOperation("查询有效的雨量报警记录信息")
    public TableDataInfo getRainfallMonitoringList(RainfallMonitoring rainfallMonitoring)
    {
        startPage();
        List<Map<String,Object>> list = rainfallMonitoringService.getRainfallMonitoringList(rainfallMonitoring);
        return getDataTable(list);
    }



    /**
     * 查询水库分布列表
     */
    @GetMapping("/getReservoirList")
    @ApiModelProperty("查询水库分布列表")
    public TableDataInfo getReservoirList(Reservoir reservoir)
    {
        startPage();
        List<Reservoir> list = reservoirService.selectReservoirList(reservoir);

        return getDataTable(list);
    }

    /**
     * 查询联防单位列表
     */
    @GetMapping("/getJointDefenceUnitList")
    @ApiOperation("查询联防单位列表")
    public TableDataInfo getJointDefenceUnitList(JointDefenceUnit jointDefenceUnit)
    {
        startPage();
        List<JointDefenceUnit> list = jointDefenceUnitService.selectRemoteJointDefenceUnitList(jointDefenceUnit);
        return getDataTable(list);
    }


    /**
     * 查询防洪重点地段管理列表
     */
    @GetMapping("/getKeysAreasList")
    @ApiOperation("查询防洪重点地段管理列表")
    public TableDataInfo getKeysAreasList(KeysAreas keysAreas)
    {
        startPage();
        List<Map<String,Object>> list = keysAreasService.selectKeysAreasList(keysAreas);
        return getDataTable(list);
    }




}
